<?php
class tag{
	function _guestbook($attr,$content){
	    $row=$attr['row'];
		$catid=$attr['catid'];
		$str='';
		$str.='<?php $db=M("news");';
		$str.='$row=$db->where("catid='.$catid.'")->limit('.$row.')->findall();';
		$str.='foreach($row as $field):?>';
	    $str.=$content;
		$str.='<?php endforeach; ?>';
		return $str;
	
	}
}


?>